<html>
<head><meta charset="utf-8"><title>DormantMutRef · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/DormantMutRef.html">DormantMutRef</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206681138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/DormantMutRef/near/206681138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/DormantMutRef.html#206681138">(Aug 12 2020 at 11:03)</a>:</h4>
<p>We currently have a btree PR <a href="https://github.com/rust-lang/rust/pull/74437/files#diff-1669d4df3278e7aa0eb152f5d13bb141">adding an interesting unsafe abstraction</a> that I haven't seen before, but that could be more generally useful: <code>DormantMutRef</code>.<br>
Not sure what to do with that right now beyond using it in btree, but Cc some people that have expressed interest in such unsafe abstractions in the past: <span class="user-mention" data-user-id="239881">@Josh Triplett</span> <span class="user-mention" data-user-id="256759">@boats</span> <span class="user-group-mention" data-user-group-id="810">@WG-unsafe-code-guidelines</span></p>



<a name="209601675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/DormantMutRef/near/209601675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/DormantMutRef.html#209601675">(Sep 10 2020 at 06:56)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="1977">@T-lang</span> FYI, here is an interesting little abstraction for unsafe raw pointer code that turned out very useful in <code>BTreeMap</code>: <a href="https://github.com/rust-lang/rust/pull/74437/files#diff-1669d4df3278e7aa0eb152f5d13bb141"><code>DormantMutRef</code></a>. I think it might be more generally useful even, so this seems relevant for the "unsafe code ergonomics" that keep coming up.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>